CC = gcc
CFLAGS = -W -Wall
LIBS =
EXE = q

all: q_main.o q_common.o qe_func.o qe_vars.o qe_operator.o qe_symbols.o  qi_interpreter.o qi_vars.o qi_func.o qi_grammar.o qi_type.o
	$(CC) -o $(EXE) $^ $(LIBS) $(CFLAGS)

q_main.o: q_main.c
	$(CC) -c q_main.c $(CFLAGS)

q_common.o: q_common.c
	$(CC) -c q_common.c $(CFLAGS)

qe_func.o: executer/qe_func.c
	$(CC) -c executer/qe_func.c $(CFLAGS)

qe_vars.o: executer/qe_vars.c
	$(CC) -c executer/qe_vars.c $(CFLAGS)

qe_operator.o: executer/qe_operator.c
	$(CC) -c executer/qe_operator.c $(CFLAGS)

qe_structdef.o: executer/qe_structdef.c
	$(CC) -c executer/qe_structdef.c $(FLAGS)

qe_symbols.o: executer/qe_symbols.c
	$(CC) -c executer/qe_symbols.c $(CFLAGS)

qi_interpreter.o: interpreter/qi_interpreter.c
	$(CC) -c interpreter/qi_interpreter.c $(CFLAGS)

qi_vars.o: interpreter/qi_vars.c
	$(CC) -c interpreter/qi_vars.c $(CFLAGS)

qi_func.o: interpreter/qi_func.c
	$(CC) -c interpreter/qi_func.c $(CFLAGS)

qi_type.o: interpreter/qi_type.c
	$(CC) -c interpreter/qi_type.c $(CFLAGS)

qi_grammar.o: interpreter/qi_grammar.c
	$(CC) -c interpreter/qi_grammar.c $(CFLAGS)

clean:
	-rm *.o $(EXE)

cleanobj:
	-rm *.o
